package ${package.Mapper};

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import ${package.Entity}.${entity};
import ${superMapperClassPackage};
<#if mapperAnnotation>
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
</#if>

/**
 * @Author: ${author}
 * @Date: ${date}
 * @Description:
 **/
<#if mapperAnnotation>
@Mapper
</#if>
<#if kotlin>
interface ${table.mapperName} : ${superMapperClass}<${entity}>
<#else>
public interface ${table.mapperName} extends ${superMapperClass}<${entity}> {

    /**
     * 根据id查询
     * @param id
     * @return
     */
    ${entity} select${entity}ById(@Param("id") Long id);

    /**
     * 批量查询
     * @param bean
     * @return
     */
    List<${entity}> select${entity}List(${entity} bean);

    /**
    * 分页查询
    * @param bean
    * @return
    */
    IPage<${entity}> select${entity}ListByPage(Page<${entity}> page, ${entity} bean);

    /**
     * 新增
     * @param bean
     */
    Integer insert${entity}(${entity} bean);

    /**
     * 根据id修改
     * @param bean
     */
    Integer update${entity}ById(${entity} bean);

    /**
     * 根据id删除
     * @param id
     */
    Integer delete${entity}ById(@Param("id") Long id);

}
</#if>
